home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er 1994 September
/
64er_Magazin_94-09_1994_Markt__Technik_de_Side_B.d64
/
imp.source #4
< prev
next >
Wrap
Text File
|
2022-10-26
|
24KB
|
1,403 lines
;---------------------------------------
;
; - I M P E R O I D V 4 -
;
; - by Hannes Sommer -
;
; - (c) Markt & Technik '94 -
;
;---------------------------------------
elo = $fa
ehi = $fb
v = 53248
be = $47f8
bord = 703
*= $8000
jmp title
cols .byte 0,0,0,0,0,0,0,0
.byte 0,0,0,0,0,0,0,0
.byte 0,9,8,10,15,7,1,1
.byte 1,1,13,3,14,4,6,0
.byte 0,0,0,0,0,0,0,0
.byte 0,0,0,0,0,0,0,0
;------------ F L I - Logo -------------
fli
lda #56
sta $d011
inc fly1+1
fly1 lda #0
lsr a
and #31
tay
ldx #0
fli0 lda cols,y
sta $50,x
iny
inx
cpx #15
bne fli0
lda #0
sta $5f
lda #49
fli1 cmp $d012
bcs fli1
ldx #3
fli2 dex
bne fli2
lda #63
ldx #8
sta $d011
stx $d018
lda $5f
sta $d020
sta $d021
lda #56
ldx #24
sta $d011
stx $d018
lda $5f
sta $d020
sta $d021
lda #57
ldx #40
sta $d011
stx $d018
lda $5f
sta $d020
sta $d021
lda #58
ldx #56
sta $d011
stx $d018
lda $5f
sta $d020
sta $d021
lda #59
ldx #72
sta $d011
stx $d018
lda $50
sta $d020
sta $d021
lda #60
ldx #88
sta $d011
stx $d018
lda $51
sta $d020
sta $d021
lda #61
ldx #104
sta $d011
stx $d018
lda $52
sta $d020
sta $d021
lda #62
ldx #120
sta $d011
stx $d018
lda $50
sta $d020
sta $d021
lda #63 ;Line #2
ldx #8
sta $d011
stx $d018
lda $51
sta $d020
sta $d021
lda #56
ldx #24
sta $d011
stx $d018
lda $52
sta $d020
sta $d021
lda #57
ldx #40
sta $d011
stx $d018
lda $53
sta $d020
sta $d021
lda #58
ldx #56
sta $d011
stx $d018
lda $50
sta $d020
sta $d021
lda #59
ldx #72
sta $d011
stx $d018
lda $51
sta $d020
sta $d021
lda #60
ldx #88
sta $d011
stx $d018
lda $52
sta $d020
sta $d021
lda #61
ldx #104
sta $d011
stx $d018
lda $53
sta $d020
sta $d021
lda #62
ldx #120
sta $d011
stx $d018
lda $54
sta $d020
sta $d021
lda #63 ;Line #3
ldx #8
sta $d011
stx $d018
lda $55
sta $d020
sta $d021
lda #56
ldx #24
sta $d011
stx $d018
lda $50
sta $d020
sta $d021
lda #57
ldx #40
sta $d011
stx $d018
lda $51
sta $d020
sta $d021
lda #58
ldx #56
sta $d011
stx $d018
lda $52
sta $d020
sta $d021
lda #59
ldx #72
sta $d011
stx $d018
lda $53
sta $d020
sta $d021
lda #60
ldx #88
sta $d011
stx $d018
lda $54
sta $d020
sta $d021
lda #61
ldx #104
sta $d011
stx $d018
lda $55
sta $d020
sta $d021
lda #62
ldx #120
sta $d011
stx $d018
lda $56
sta $d020
sta $d021
lda #63 ;Line #4
ldx #8
sta $d011
stx $d018
lda $57
sta $d020
sta $d021
lda #56
ldx #24
sta $d011
stx $d018
lda $50
sta $d020
sta $d021
lda #57
ldx #40
sta $d011
stx $d018
lda $51
sta $d020
sta $d021
lda #58
ldx #56
sta $d011
stx $d018
lda $52
sta $d020
sta $d021
lda #59
ldx #72
sta $d011
stx $d018
lda $53
sta $d020
sta $d021
lda #60
ldx #88
sta $d011
stx $d018
lda $54
sta $d020
sta $d021
lda #61
ldx #104
sta $d011
stx $d018
lda $55
sta $d020
sta $d021
lda #62
ldx #120
sta $d011
stx $d018
lda $56
sta $d020
sta $d021
lda #63 ;Line #5
ldx #8
sta $d011
stx $d018
lda $57
sta $d020
sta $d021
lda #56
ldx #24
sta $d011
stx $d018
lda $58
sta $d020
sta $d021
lda #57
ldx #40
sta $d011
stx $d018
lda $59
sta $d020
sta $d021
lda #58
ldx #56
sta $d011
stx $d018
lda $52
sta $d020
sta $d021
lda #59
ldx #72
sta $d011
stx $d018
lda $53
sta $d020
sta $d021
lda #60
ldx #88
sta $d011
stx $d018
lda $54
sta $d020
sta $d021
lda #61
ldx #104
sta $d011
stx $d018
lda $55
sta $d020
sta $d021
lda #62
ldx #120
sta $d011
stx $d018
lda $56
sta $d020
sta $d021
lda #63 ;Line #6
ldx #8
sta $d011
stx $d018
lda $57
sta $d020
sta $d021
lda #56
ldx #24
sta $d011
stx $d018
lda $58
sta $d020
sta $d021
lda #57
ldx #40
sta $d011
stx $d018
lda $59
sta $d020
sta $d021
lda #58
ldx #56
sta $d011
stx $d018
lda $54
sta $d020
sta $d021
lda #59
ldx #72
sta $d011
stx $d018
lda $55
sta $d020
sta $d021
lda #60
ldx #88
sta $d011
stx $d018
lda $56
sta $d020
sta $d021
lda #61
ldx #104
sta $d011
stx $d018
lda $57
sta $d020
sta $d021
lda #62
ldx #120
sta $d011
stx $d018
lda $58
sta $d020
sta $d021
lda #63 ;Line #7
ldx #8
sta $d011
stx $d018
lda $59
sta $d020
sta $d021
lda #56
ldx #24
sta $d011
stx $d018
lda $56
sta $d020
sta $d021
lda #57
ldx #40
sta $d011
stx $d018
lda $57
sta $d020
sta $d021
lda #58
ldx #56
sta $d011
stx $d018
lda $58
sta $d020
sta $d021
lda #59
ldx #72
sta $d011
stx $d018
lda $59
sta $d020
sta $d021
lda #60
ldx #88
sta $d011
stx $d018
lda $57
sta $d020
sta $d021
lda #61
ldx #104
sta $d011
stx $d018
lda $58
sta $d020
sta $d021
lda #62
ldx #120
sta $d011
stx $d018
lda $59
sta $d020
sta $d021
lda #63
ldx #12
sta $d011
stx $d018
lda #0
sta $d020
sta $d021
lda #88
sta $d011
rts
;--------------- G A M E ---------------
game
lda #64
sta $d011
sta $d020
sta $d021
ldx #0
in1 lda #255
sta $4000,x
lda #0
sta $d800,x
sta $d900,x
sta $da00,x
sta $db00,x
dex
bne in1
ldx #6
lda #255
in2 sta backxh,x
sta packxh,x
dex
bpl in2
lda #$44 ;Aufbau des
sta in6+2 ;Sterne-Himmels
ldx #0
stx in6+1
ldy #0
in5 tya
clc
adc starl,x
and #31
in6 sta $4400,y
iny
cpy #40
bne in5
lda in6+1
clc
adc #40
sta in6+1
bcc in7
inc in6+2
in7 inx
cpx #24
bne in5-2
ldx #39
in8 lda #32
sta $4400+960,x
lda #255
sta $4100,x
dex
bpl in8
lda #0
sta end+1
sta backpoint
sta packpoint
sta backspr
sta packspr
lda #1
sta t20+1
lda #15
sta t30+1
lda #14 ;Player-Init
sta c
lda #48
sta b
lda #80
sta x
lda #140
sta y
lda #0
sta xh
lda #<enemies
sta elo
lda #>enemies
sta ehi
lda #20
sta t51+1
sei ;Irq+Grafik-Modi
lda #<irq
sta $fffe
lda #>irq
sta $ffff
lda #129
sta $d01a
lda #250
sta $d012
lda #27
sta $d011
lda #198
sta $dd00
lda #16
sta $d018
lda #200
sta $d016
cli
s1
end lda #0 ;Ende ?
beq noend
lda #64
sta $d011
sta $d021
sei
jmp title
noend
jmp s1
starl .byte 0,5,20,13,28
.byte 14,3,9,23,18
.byte 4,10,21,8,27
.byte 11,2,26,15,6
.byte 24,1,16,29,7
nmi inc end+1 ;*** NMI ***
rti
irq pha ;*** IRQ ***
txa
pha
tya
pha
lda $d019
sta $d019
bmi t1
lda $dc0d
cli
irqend pla
tay
pla
tax
pla
rti
t1
inc bord
lda #255
sta v+21
sta v+28
lda #11
sta v+37
lda #1
sta v+38
ldx #15
t5 lda starp,x ;Star-moving!
and #248
sta t6+1
txa
and #7
tay
lda #255
t6 sta $4000,y
lda starp,x
sec
sbc stars,x
sta starp,x
and #248
sta t7+1
lda starp,x
and #7
sta tt7+1
tt7 lda und
t7 sta $4000,y
dex
bpl t5
inc t8+1 ;Star-Flashing!
t8 lda #0
lsr a
and #15
tax
lda stflash,x
sta $d021
lda $dc00 ;Joystick-Control!
sta joyst
and #1
bne t11
lda y
cmp #52
bcc t12
sbc #2
sta y
t11 lda joyst
and #2
bne t12
lda y
cmp #224
bcs t12
adc #2
sta y
t12 lda joyst
and #4
bne t13
lda ix
cmp #13
bcc t14
lda x
sbc #2
sta x
bcs t14
dec xh
t13 lda joyst
and #8
bne t14
lda ix
cmp #160
bcs t14
lda x
adc #2
sta x
bcc t14
inc xh
t14
lda x ;Player-Sprite!
sta v
lda y
sta v+1
lda xh
sta v+16
lda b
sta be
lda c
sta v+39
dec t20+1
t20 lda #1 ;* New Back-Sprites *
bne t22-2
ldx backpoint
ldy backspr
lda backtime,x
bne t21
ldx #0
stx backpoint
lda backtime,x
t21 sta t20+1
lda backbdat,x
sta backb,y
lda #84
sta backx,y
lda #1
sta backxh,y
inc backpoint
inc backspr
lda backspr
cmp #7
bne t22-2
lda #0
sta backspr
ldx #6
t22 lda backx,x ;Back X-moving!
sec
sbc #4
sta backx,x
bcs t23
dec backxh,x
t23 lda backxh,x ;Back to Sprites!
bmi t25
beq t24
lda v+16
ora oder+1,x
sta v+16
t24 ldy mal2,x
lda backx,x
sta v+2,y
lda #50
sta v+3,y
lda backb,x
sta be+1,x
lda #15
sta v+40,x
t25 dex
bpl t22
dec t30+1
t30 lda #1 ;* New Pack-Sprites *
bne t32-2
ldx packpoint
ldy packspr
lda packtime,x
bne t31
ldx #0
stx packpoint
lda packtime,x
t31 sta t30+1
lda packbdat,x
sta packb,y
lda #84
sta packx,y
lda #1
sta packxh,y
inc packpoint
inc packspr
lda packspr
cmp #7
bne t32-2
lda #0
sta packspr
ldx #6
t32 lda packx,x ;Back X-moving!
sec
sbc #4
sta packx,x
bcs t33
dec packxh,x
t33 dex
bpl t32
t40 lda #0 ;* 1/3-Action *
bne t50
inc b ;Ship circling!
lda b
cmp #56
bne t41
lda #48
sta b
t41
ldx #7
t42 inc b,x
lda b,x
and #7
ora #64
sta b,x
dex
bne t42
jmp t70
t50 cmp #1 ;* 2/3-Action *
bne t60
dec t51+1
t51 lda #20 ;Get Enemies!
bne t55
ldy #0
lda (elo),y ;1.Sprite-Nr
cmp #255
bne tt51
lda #<enemies
sta elo
lda #>enemies
sta ehi
lda (elo),y
tt51 tax
iny
lda #0
sta xh,x
sta mirrx,x
sta mirry,x
sta wieder,x
sta count,x
lda (elo),y ;2.X-Pos
sta ix,x
asl a
sta x,x
bcc t52
inc xh,x
t52 iny
lda (elo),y ;3.Y-Pos
clc
adc #110
sta y,x
iny
lda (elo),y ;4.Block
sta b,x
iny
lda (elo),y ;5.Colour
sta c,x
and #128
beq t53
inc mirrx,x ;& Xmirror
t53 lda (elo),y
and #64
beq t54
inc mirry,x ;& Ymirror
t54 iny
lda (elo),y ;6.Movement
sta point,x
iny
lda (elo),y ;7.Delay
sta t51+1
lda elo
clc
adc #7
sta elo
bcc t55
inc ehi
t55
jmp t70
t60 lda #255 ;* 3/3-Action *
sta t40+1
t70 inc t40+1
;----------- Move Enemies! -------------
ldx #7
m1 lda y,x
beq tm20
lda wait,x
beq m2
dec wait,x
tm20 jmp m20
m2 lda count,x
beq mm2
jmp m10
mm2 ldy point,x
lda movedats,y
cmp #128 ;Jumping
beq m5 ; &
cmp #129 ;Mirror?
beq m4
cmp #130
bne m3
lda mirrx,x
eor #1
sta mirrx,x
jmp m5
m3 cmp #131
bne m7
lda mirrx,x
eor #1
sta mirrx,x
m4 lda mirry,x
eor #1
sta mirry,x
m5 inc wieder,x
lda wieder,x
cmp movedats+1,y
beq m6
lda movedats+2,y
sta point,x
tay
jmp m7
m6 lda point,x
clc
adc #3
sta point,x
tay
m7 lda mirry,x ;Move-Set!
bne mm7
lda movedats,y
sta verti,x
jmp m8
mm7 lda #0
sec
sbc movedats,y
sta verti,x
m8 lda mirrx,x
bne mm8
lda movedats+1,y
sta horiz,x
jmp m9
mm8 lda #0
sec
sbc movedats+1,y
sta horiz,x
m9 lda movedats+2,y
sta count,x
lda point,x
clc
adc #3
sta point,x
m10 dec count,x ;Koord.Moving!
lda y,x
clc
adc verti,x
sta y,x
lda horiz,x
bpl m11
clc
adc x,x
sta x,x
bcs m20
bcc m12
m11 clc
adc x,x
sta x,x
bcc m20
m12 lda xh,x
eor #1
sta xh,x
m20 dex
beq m21
jmp m1
m21
ldx #7
t80 lda x,x ;* x to ix *
lsr a
ldy xh,x
beq t81
ora #128
t81 sta ix,x
cmp #175
bcc t82
lda #0
sta y,x
t82 dex
bpl t80
k1 lda $d011
bmi k1
lda #71
k2 cmp $d012
bcs k2
lda v+16
and #1
sta v+16
ldx #6
k3 lda packxh,x ;Pack-Spr.oben!
bmi k5
beq k4
lda v+16
ora oder+1,x
sta v+16
k4 ldy mal2,x
lda packx,x
sta v+2,y
lda #80
sta v+3,y
lda packb,x
sta be+1,x
lda #15
sta v+40,x
k5 dex
bpl k3
lda #101
k20 cmp $d012
bcs k20
lda v+16
and #1
sta v+16
ldx #7
k21 ldy mal2,x ;* Enemy Sprites *
lda x,x
sta v,y
lda y,x
sta v+1,y
lda b,x
sta be,x
lda c,x
sta v+39,x
lda xh,x
beq k22
lda v+16
ora oder,x
sta v+16
k22 dex
bne k21
lda #190
k50 cmp $d012 ;Pack-Spr.unten!
bcs k50
lda v+16
and #1
sta v+16
ldx #6
k51 ldy mal2,x
lda packxh,x
bmi kk52
beq k52
lda v+16
ora oder+1,x
sta v+16
k52 lda #198
sta v+3,y
lda packx,x
sta v+2,y
lda packb,x
ora #8
sta be+1,x
lda #15
sta v+40,x
kk52 dex
bpl k51
lda #220
k53 cmp $d012 ;Back-Spr.unten!
bcs k53
lda v+16
and #1
sta v+16
ldx #6
k54 ldy mal2,x
lda backxh,x
bmi kk55
beq k55
lda v+16
ora oder+1,x
sta v+16
k55 lda #228
sta v+3,y
lda backx,x
sta v+2,y
lda backb,x
ora #8
sta be+1,x
lda #15
sta v+40,x
kk55 dex
bpl k54
lda #0
sta bord
jmp irqend
starp .byte 220,10,140,200
.byte 160,180,100,50
.byte 40,90,80,240
.byte 150,110,134,215
stars .byte 1,2,1,3,1,4,1,3
.byte 2,1,4,1,1,1,3,1
stflash .byte 11,12,12,15,3,13,7,1
.byte 1,1,7,13,3,15,12,12
;-------------- T I T L E --------------
title
sei
lda #0
sta $d020
sta $d021
sta $d01a
sta $d011
sta v+27
sta v+23
sta v+29
sta fly1+1
ldx #16
ti0 sta $d000,x
sta $d400,x
sta $d408,x
dex
bpl ti0
ldx #0
lda #$35
sta 1
ti1 lda $bc00,x
sta $d800,x
lda $bc18,x
sta $d818,x
lda #0
sta $d918,x
lda #9
sta $d940,x
sta $da40,x
sta $db00,x
dex
bne ti1
lda #<nmi
sta $fffa
sta $fffe
lda #>nmi
sta $fffb
sta $ffff
lda #196
sta 56576
lda #27
sta $d011
lda #224
sta 56322
ti20 lda $d011
bmi ti20
sei
lda #120
sta $d011
lda #216
sta 53270
lda #24
sta 53272
jsr fli ;** FLI-Logo! **
lda #24 ;Text-Mode
sta $d011
ldx #0 ;Colour-changing...
ti25 lda tiwait,x
cmp $d012
bcs ti25
lda ticol1,x
sta $d022
lda ticol2,x
sta $d023
inx
cpx #4
bne ti25
ti26 lda $dc00 ;Joy-Button ?
and #16
bne ti28
jmp game
ti28
ti99 lda $d011
bpl ti99
jmp ti20
joyst .byte 0
x .byte 0,0,0,0,0,0,0,0
xh .byte 0,0,0,0,0,0,0,0
y .byte 0,0,0,0,0,0,0,0
b .byte 0,0,0,0,0,0,0,0
c .byte 0,0,0,0,0,0,0,0
ix .byte 0,0,0,0,0,0,0,0
verti .byte 0,0,0,0,0,0,0,0
horiz .byte 0,0,0,0,0,0,0,0
wait .byte 0,0,0,0,0,0,0,0
count .byte 0,0,0,0,0,0,0,0
point .byte 0,0,0,0,0,0,0,0
mirry .byte 0,0,0,0,0,0,0,0
mirrx .byte 0,0,0,0,0,0,0,0
wieder .byte 0,0,0,0,0,0,0,0
backx .byte 0,0,0,0,0,0,0
backxh .byte 0,0,0,0,0,0,0
backb .byte 0,0,0,0,0,0,0
backpoint .byte 0
backspr .byte 0
backtime .byte 6,20,6,6,15
.byte 6,40
.byte 6,6,6,15
.byte 6,6,40
.byte 30,20,6,6,6,6,40
.byte 0
backbdat .byte 128,130,128,129,130
.byte 128,130
.byte 128,129,129,130
.byte 128,129,130
.byte 131,132
.byte 128,129,129,129,130
packx .byte 0,0,0,0,0,0,0
packxh .byte 0,0,0,0,0,0,0
packb .byte 0,0,0,0,0,0,0
packpoint .byte 0
packspr .byte 0
packtime .byte 32,22,12,22
.byte 6,32,38
.byte 0
packbdat .byte 131,131,132,131
.byte 128,130,131
oder .byte 1,2,4,8,16,32,64,128
mal2 .byte 0,2,4,6,8,10,12,14
tiwait .byte 100,134,158,188
ticol1 .byte 9,6,9,4
ticol2 .byte 5,14,10,12
;------------ Move-Daten ---------------
movedats .byte 0,0,255
.byte 128,255,0
.byte 0,255,9 ;* 6 *
.byte 1,255,1
.byte 0,255,1
.byte 1,255,5
.byte 2,255,5
.byte 3,255,5
.byte 2,255,5
.byte 1,255,5
.byte 0,255,1
.byte 1,255,1
.byte 129,255,6
.byte 1,248,4 ;* 39 *
.byte 1,249,4
.byte 1,250,4
.byte 1,251,4
.byte 1,252,3
.byte 1,253,3
.byte 1,254,2
.byte 1,255,2
.byte 1,0,3
.byte 1,1,3
.byte 1,2,4
.byte 1,3,4
.byte 1,4,4
.byte 1,5,4
.byte 1,6,4
.byte 1,7,5
.byte 1,8,10
enemies .byte 1,170,0,64,7,6,3
.byte 2,170,0,64,13,6,3
.byte 3,170,0,64,10,6,3
.byte 4,170,0,64,14,6,3
.byte 5,170,0,64,5,6,3
.byte 6,170,0,64,8,6,3
.byte 7,170,0,64,9,6,98
.byte 1,0,0,64,$87,6,3
.byte 2,0,0,64,$8d,6,3
.byte 3,0,0,64,$8a,6,3
.byte 4,0,0,64,$8e,6,3
.byte 5,0,0,64,$85,6,3
.byte 6,0,0,64,$88,6,3
.byte 7,0,0,64,$89,6,102
.byte 1,170,0,64,7,39,1
.byte 2,170,0,64,13,39,1
.byte 3,170,0,64,10,39,1
.byte 4,170,0,64,14,39,1
.byte 5,170,0,64,5,39,1
.byte 6,170,0,64,8,39,1
.byte 7,170,0,64,9,39,40
.byte 1,0,64,64,$c7,39,1
.byte 2,0,64,64,$cd,39,1
.byte 3,0,64,64,$ca,39,1
.byte 4,0,64,64,$ce,39,1
.byte 5,0,64,64,$c5,39,1
.byte 6,0,64,64,$c8,39,1
.byte 7,0,64,64,$c9,39,40
.byte 255
*= $9f00
und .byte 127,191,223,239
.byte 247,251,253,254